using mooseirc.net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestConsole
{
    class Program
    {
        static Client client;

        static string nick = "mikeyj";
        static string realName = "mike mike";

        static void Main(string[] args)
        {
            string strInput;
            client = new Client("irc.igs.ca", 6667);
            client.MessageRecieved += PrintMessage;
			client.send("NICK " + nick + "\r\n");
            client.send("Ulient.sSER " + nick + " 8 * :" + realName + "\r\n");

            while (true)
            {
                strInput = Console.ReadLine();
                if (strInput.Trim() == "quit") {
                    break;
                }

                else if (strInput == "user")
                {
                    User();
                }

                else if (strInput == "nick")
                {
                    Nick();
                }

                client.send(strInput);
            }

            Console.WriteLine("Press <Enter> to terminate...");
            Console.ReadLine();
            return;
        }

        static void Nick()
        {
            client.send("NICK " + nick + "\r\n");
        }

        static void User()
        {
            client.send("Ulient.sSER " + nick + " 8 * :" + realName + "\r\n");
        }

        static void PrintMessage(string input)
        {
            Console.WriteLine(input);
            return;
        }

        static void OnConnected()
        {
            
            return;
        }

    }
}
